#ifndef _APPS_BDESKTOP_CSVGICON_H_
#define _APPS_BDESKTOP_CSVGICON_H_

#include "cdockicon.h"
#include <buola/io/curl.h>
#include <unordered_map>
#include <buola/gl/cgltexture.h>

namespace buola { namespace bdesktop {

class CSVGIcon : public CDockIcon
{
public:
    CSVGIcon(const CURL &pURL);
    virtual ~CSVGIcon();

    virtual double GetRelativeWidth();
    virtual void Draw(const CRect &pRect,double pOpacity);

private:
    CGLTexture *GetTexture(int pSize);

private:
    CURL mURL;
    std::unordered_map<int,CGLTexture*> mTextures;
};

/*namespace bdesktop*/ } /*namespace buola*/ }

#endif
